package com.example.demo.service.impl;

import com.example.demo.mapper.TopicMapper;
import com.example.demo.pojo.Topic;
import com.example.demo.service.ITopicService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;

@Service("TopicService")
public class TopicServiceImpl implements ITopicService {

    @Resource
    private TopicMapper TopicDao;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        // TODO Auto-generated method stub
        return this.TopicDao.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Topic Topic) {
        // TODO Auto-generated method stub
        return this.TopicDao.insert(Topic);
    }

    @Override
    public int insertSelective(Topic Topic) {
        // TODO Auto-generated method stub
        return this.TopicDao.insertSelective(Topic);
    }

    @Override
    public Topic selectByPrimaryKey(Integer id) {
        // TODO Auto-generated method stub
        return this.TopicDao.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(Topic Topic) {
        // TODO Auto-generated method stub
        return this.TopicDao.updateByPrimaryKeySelective(Topic);
    }

    @Override
    public int updateByPrimaryKey(Topic Topic) {
        // TODO Auto-generated method stub
        return this.TopicDao.updateByPrimaryKey(Topic);
    }

    @Override
    public List<Topic> selectTopic() {
        // TODO Auto-generated method stub
        return this.TopicDao.selectTopic();
    }

    @Override
    public List<Topic> selectTopicByIfc(String ifc) {
        return this.TopicDao.selectTopicByIfc(ifc);
    }

    @Override
    public List<Topic> selectTopicByIfcLeixing(String ifc,String leixing) {
        return this.TopicDao.selectTopicByIfcLeixing(ifc,leixing);
    }

    @Override
    public List<Topic> selectTopicByIfcIcon(String ifc,Integer icon) {
        return this.TopicDao.selectTopicByIfcIcon(ifc,icon);
    }

    @Override
    public List<Topic> selectTopicByIfcSuiji(String ifc) {
        return this.TopicDao.selectTopicByIfcSuiji(ifc);
    }

    @Override
    public List<Topic> selectTopicByIfcNdu(String ifc, Integer ndu) {
        return this.TopicDao.selectTopicByIfcNdu(ifc, ndu);
    }

    @Override
    public List<Topic> selectTopicByTid(Integer tid) {
        return this.TopicDao.selectTopicByTid(tid);
    }
}
